package com.chance.cc.crawler.prod.command.trigger.domain.commerce.tb;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tb.TaobaoH5ProductDetailCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tb.TaobaoProductCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tb.TaobaoProductDetailCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;


public class TBCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
        publishTBH5ProductScheduleTriggerInfo();
    }

    public static void publishTBCommentScheduleTriggerInfo(){
        CrawlerJob crawlerJob = TaobaoProductCommentCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                TaobaoProductCommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 0 * * ?",
                "淘宝评论每天凌晨0:10采集一次");
    }

    public static void publishTBProductScheduleTriggerInfo(){
        CrawlerJob crawlerJob = TaobaoProductDetailCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                TaobaoProductDetailCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "0 10 0 * * ?",
                "淘宝评论每天凌晨0:10采集一次");
    }

    public static void publishTBH5ProductScheduleTriggerInfo(){
        CrawlerJob crawlerJob = TaobaoH5ProductDetailCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                TaobaoH5ProductDetailCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 5 * * ?",
                "淘宝评论每天5:10采集一次");
    }
}
